package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_FAULT_TYPE")
@Schema(description="故障类型")
public class FaultType extends BaseEntity {

private static final long serialVersionUID=1L;

    @Id
    @Column(name = "TYPE_CODE_",updatable = false)
    @Schema(description = "故障类型编码")
    private String typeCode;

    @Column(name = "TYPE_NAME_")
    @Schema(description = "故障类型名称")
    private String typeName;

    @Column(name = "GROUP_Id_")
    @Schema(description = "群组编码(ID)")
    @Dict(dicCode="id", dicEntity = EquipmentPersonGroup.class, dicText = "groupName")
    private String groupId;//

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

    @Transient
    private EquipmentPersonGroup equipmentPersonGroup;
}
